﻿<!--#include file="const.asp"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>


<%
if sid="Null" then
	Response.Redirect "save.asp"
	Response.end
end if
IF  Request.QueryString("Action")="save" Then
	call save
else
	call index
end if
end Function



Function index
dim page
    		Page = Request("page")      '当前页数
    		If Page = "" Then Page = 1
   		If Not IsNumeric(Page) Then Page = 1
    		Page = CLng(Page)
    		If Page < 1 Then Page = 1


	dim id,rs,sql,str,Runtxt
	Runtxt=qingtian.RunStr

  		id = Request("id")    
    		If id = "" Then id = 0
   		If Not IsNumeric(id) Then id = 0
    		id = CLng(id)
    		If id < 0 Then id = 0

	set rs=server.CreateObject("adodb.recordset")
	sql="select top 1 * from qingtian_bbs where id="&id&""
	rs.open sql,conn,1,1
	if not (rs.bof and rs.eof) then



%>
	<card title="删除论坛"><p align="left">

	确认删除论坛:<%=qingtian.utf8(rs("name"))%>吗?<br/>

    	<a href="delfbbsclass.asp?Action=save&amp;page=<%=page%>&amp;id=<%=id%>&amp;sid=<%=sid%>">确定删除</a><br/>
  
	<%
	else
	%>
	<card title="删除论坛"><p align="left">
        没有该论坛分类！<br/>
	<%
	end if
	Rs.close
	set rs=nothing


%>
-------------<br/>
<a href='fbbsclass.asp?page=<%=page%>&amp;sid=<%=sid%>'>返回栏目管理</a><br/>
<a href='index.asp?sid=<%=sid%>'>后台管理首页</a><br/>
<%

End Function




Function save
dim page,rs,sql,i
    		Page = Request("page")      '当前页数
    		If Page = "" Then Page = 1
   		If Not IsNumeric(Page) Then Page = 1
    		Page = CLng(Page)
    		If Page < 1 Then Page = 1
	dim id


    		id = Request("id")    
    		If id = "" Then id = 0
   		If Not IsNumeric(id) Then id = 0
    		id = CLng(id)
    		If id < 0 Then id = 0



		conn.execute("update [qingtian_bbs_forum] set [del]=1 WHERE [del]=0 and listid="&id&"")
		set rs=Server.CreateObject("ADODB.Recordset")
		Sql = "select top 1 *  FROM qingtian_bbs where id="&id&""
		rs.open sql,conn,1,3
		if not (rs.eof and rs.bof) then
		rs.delete()
		end if
		rs.Close
		Sql = "select *  FROM qingtian_bbsclass where ext=5 and img='"&id&"'"
		rs.open sql,conn,1,3
		if not (rs.eof and rs.bof) then
		For i=1 to  rs.RecordCount
		If Rs.Eof Then
			exit For
		End If
		rs.delete()
	 	Rs.MoveNext
	  	Next
		end if
		rs.Close
		Set rs = Nothing
	%>
	<card id="save" title="删除栏目" ontimer="fbbsclass.asp?page=<%=page%>&amp;id=<%=id%>&amp;sid=<%=sid%>"><timer value="20"/>
		<p align="left">
		删除栏目成功!<br/>
<a href='fbbsclass.asp?page=<%=page%>&amp;sid=<%=sid%>'>返回栏目管理</a><br/>
<a href='index.asp?sid=<%=sid%>'>后台管理首页</a><br/>
<%
end Function 



%>
